<?php



return [

    'check_menu_roles'       => true,

    'route' => [

        'prefix' => env('ADMIN_ROUTE_PREFIX', 'api'),

        'namespace' => 'App\\Admin\\Controllers',

        'middleware' => ['web', 'admin'],
    ],


    'auth' => [

        'controller' => App\Admin\Controllers\AuthController::class,

        'guard' => 'admin',

        'guards' => [
            'admin' => [
                'driver'   => 'session',
                'provider' => 'admin',
            ],
        ],

        'providers' => [
            'admin' => [
                'driver' => 'eloquent',
//                'model'  => \App\Models\AdminUser::class,
                'model'  => \App\Models\NewUsers::class,
            ],
        ],

        // Add "remember me" to login form
        'remember' => true,

        // 页面禁止超过该时间 自动登出
        'login_time' => 900, // 15分钟  登录保持时间

        // Redirect to the specified URI when user is not authorized.
//        'redirect_to' => 'auth/login',
        'redirect_to' => 'login',
        'myInfo' => 'auth/setting',

        // The URIs that should be excluded from authorization.
        'excepts' => [
//            'auth/login',
//            'auth/logout',
            'login', 'logout',
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Laravel-admin upload setting
    |--------------------------------------------------------------------------
    |
    | File system configuration for form upload files and images, including
    | disk and upload path.
    |
    */
    'upload' => [

        // Disk in `config/filesystem.php`.
        'disk' => 'admin',

        // Image and file upload path under the disk above.
        'directory' => [
            'image' => 'images',
            'file'  => 'files',
        ],
    ],

    'app_url' => env('APP_URL'),

    /*
    |--------------------------------------------------------------------------
    | Laravel-admin database settings
    |--------------------------------------------------------------------------
    |
    | Here are database settings for laravel-admin builtin model & tables.
    |
    */
    'database' => [

        // Database connection for following tables.
        'connection' => '',

        // User tables and model.
        'users_table' => 'yt_new_users',
        'users_model' => \App\Models\NewUsers::class,

        // Role table and model.
        'roles_table' => 'admin_roles',
//        'roles_model' => \App\Models\Role::class,

        // Permission table and model.
//        'permissions_table' => 'admin_permissions',
//        'permissions_model' => \App\Models\Permission::class,

        // Menu table and model.
        'menu_table' => 'admin_menu',
        'menu_model' => \App\Models\NewMenu::class,

        // Pivot table for table above.
        'operation_log_table'    => 'admin_operation_log',
        'user_permissions_table' => 'admin_user_permissions',
        'role_users_table'       => 'yt_new_user_role',

        'role_permissions_table' => 'admin_role_permissions',
        'role_menu_table'        => 'yt_new_role_menu',
    ],



];
